package org.jay.angla.onlab;

import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.PopupWindow;

public class PopWinTool extends PopupWindow {

	private View mainView;
	private LinearLayout mDarkCurrentLayout;
	private LinearLayout mRezeroLayout;
	private LinearLayout mLightSourceLayout;
	private LinearLayout mLightOnoffLayout;

	public PopWinTool(Activity paramActivity, View.OnClickListener listener,
			int paramInt1, int paramInt2) {
		mainView = LayoutInflater.from(paramActivity).inflate(
				R.layout.popwindow_main, null);
		mDarkCurrentLayout = (LinearLayout) mainView
				.findViewById(R.id.layout_dark_current);
		mRezeroLayout = (LinearLayout) mainView
				.findViewById(R.id.layout_rezero);
		mLightSourceLayout = (LinearLayout) mainView
				.findViewById(R.id.layout_light_source);
		mLightOnoffLayout = (LinearLayout) mainView
				.findViewById(R.id.layout_light_onoff);

		if (listener != null) {
			mDarkCurrentLayout.setOnClickListener(listener);
			mRezeroLayout.setOnClickListener(listener);
			mLightOnoffLayout.setOnClickListener(listener);
			mLightSourceLayout.setOnClickListener(listener);
		}
		setContentView(mainView);
		setWidth(paramInt1);
		setHeight(paramInt2);
		// setAnimationStyle(R.style.AnimTools);
		setBackgroundDrawable(new ColorDrawable(0));
	}
}
